<!DOCTYPE html>

<html>
<body>

<title>Learn PHP</title>

<?php

$con = mysqli_connect("localhost","root","root");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
// some code
mysql_close($con);

$con=mysqli_connect('localhost','root','root');
//简单测试一下
if ($con) {
	echo '连接成功';
}else{
	echo "连接失败";
}
//执行操作
// $abc = mysqli_query( $con , 'insert into a(id) values(125)');
var_dump($abc);


?>

</body>
</html>